package etc.spec.ytt.week09.homework;

import java.util.List;

public class Cat extends Animal implements IPet {

    public Cat() {
    }

    public Cat(String name, List sounds, List foods) {
        super(name, sounds, foods);
    }

    public void cry() {
        List l = super.getSounds();
        for (int i = 0; i < l.size(); i++) {
            String s = (String) l.get(i);//强制类型转换
            System.out.println(getName() + "叫声是" + s);
        }
    }
}
